﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _commonCode : System.Web.UI.Page
{
    
    public List<LIB.easyDoc> listDoc = new List<LIB.easyDoc>();
    protected void Page_Load(object sender, EventArgs e)
    {
        //string test = "a.aspx.cs";
        //string result = LIB.trans.getExt(test);
        //Response.Write(result);
        //Response.End();

        if (!IsPostBack)
        {

        }
    }

    protected void btnGenCode_Click(object sender, EventArgs e)
    {
        string cont = txtCont.Text;
        dealHtml(cont);
    }

    private void dealHtml(string cont)
    {
        string[] para = txtPara.Text.Trim().Replace(",", "，").Split('，');

        for (int i = 0; i < para.Length; i++)
        {
            string re = string.Format("[{0}]", i + 1);
            cont = cont.Replace(re, para[i]);
        }
        txtResult.Text = cont;
    }


}